package com.itheima.demo;

import com.itheima.service.Userservice;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Demo {
    public static void main(String[] args) {
        //调用ioc容器
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
        Userservice userService = (Userservice) ac.getBean("userService");
        userService.save();

    }
}
